package es.onlysolutions.gs.web.tag;

import javax.servlet.jsp.JspWriter;
import javax.servlet.jsp.tagext.BodyTagSupport;
import java.io.IOException;

/**
 * Abstract class for all the tags of the aplication.
 */
public abstract class GSDynamicTag extends BodyTagSupport
{

    /**
     * Write a texto to the page with a new line character in the end.
     * @param html The text to write.
     * @throws java.io.IOException If dome exception during the writing happends.
     */
    protected void writeln(String html) throws IOException
    {
        JspWriter writer = pageContext.getOut();
        writer.println( html );
    }
    /**
     * Write a texto to the page.
     * @param html The text to write.
     * @throws java.io.IOException If dome exception during the writing happends.
     */
    protected void write(String html) throws IOException
    {
        JspWriter writer = pageContext.getOut();
        writer.print( html );
    }





}
